package com.jmlong.dao;

import com.github.pagehelper.Page;
import com.jmlong.domain.Commdity;
import com.jmlong.domain.CommodityGrowUp;
import com.jmlong.domain.CommodityImg;
import com.jmlong.domain.CommodityType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommodityDao {

//    public List<Commdity> getAllCommodity();

    public Page<Commdity> getAllCommodity();

//    public List<Commdity> getCommodityChooseType(String commodityType);

    public Page<Commdity> getCommodityChooseType(String commodityType);

    public Page<Commdity> searchCommodity(String searchName);

    public Integer imsertCommodityImg(CommodityImg commodityImg);

    public Integer deleteImg(String fileName);

    public Integer addCommodity(Commdity commdity);

    public Integer deleteCommodity(String uuid);

    public List<CommodityImg> selectAllImg(String uuid);

    public List<Commdity> getMerchantCommodity(String merchantID);

    public List<CommodityImg> getMerchantCommodityImg(String commodityID);

    public Commdity getCommodityInfo(String commodityID);

    public Integer updateCommodityDetail(Commdity commdity);

    public Integer addCommodityGrowup(CommodityGrowUp commodityGrowUp);

    public List<CommodityGrowUp> getCommodityGrowUp(@Param("uuid") String uuid,@Param("growUp") String growUp);

    public List<CommodityType> getCommodityType();

    public Integer updateStatus(String uuid);

    public Integer delCommodityGrow(String uuid);
}
